import pandas as pd
ori_data1 = pd.read_csv('.//X_xyvd_d2_100.csv', header=0)
ori_data2 = pd.read_csv('.//X_desc.csv', header=0)
ori_data3 = pd.read_csv('.//trn_per_300.csv', header=0)

tst_data1 = pd.read_csv('.//X_xyvd_tst_d2_100.csv', header=0)
tst_data2 = pd.read_csv('.//tst_desc.csv', header=0)
tst_data3 = pd.read_csv('.//tst_per_300.csv', header=0)
tst_data_ = pd.merge(tst_data1, tst_data2, on='ship', how='left')
tst_data_ = pd.merge(tst_data_, tst_data3, on='ship', how='left')

trn_data1 = ori_data1
trn_data2 = ori_data2.drop('type', axis=1)
trn_data3 = ori_data3.drop('type', axis=1)
trn_data_ = pd.merge(trn_data1, trn_data2, on='ship', how='left')
trn_data_ = pd.merge(trn_data_, trn_data3, on='ship', how='left')

trn_data_.to_csv('./all_feas_trn.csv', header=True, index=False)
tst_data_.to_csv('./all_feas_tst.csv', header=True, index=False)


